//
//  YZKCheckListView.h
//  GroupContract
//
//  Created by yzk on 14-7-28.
//  Copyright (c) 2014年 www.hawk-data.com. All rights reserved.
//

#import <UIKit/UIKit.h>

/**
 *  弹出pop框，包含标题，确定取消按钮，一个tableview（多选）
 */

@class YZKCheckListView;
@protocol YZKCheckListDatasource <NSObject>

@required
- (NSInteger)checkListView:(YZKCheckListView *)tableView numberOfRowsInSection:(NSInteger)section;
- (UITableViewCell *)checkListView:(YZKCheckListView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;

@end

@protocol YZKCheckListDelegate <NSObject>


- (void)checkListView:(YZKCheckListView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;

- (void)checkListView:(YZKCheckListView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath;

- (void)checkListViewDidClickForCancel:(YZKCheckListView *)tableView;
- (void)checkListViewDidClickForDone:(YZKCheckListView *)tableView;
@end


@interface YZKCheckListView : UIView
<UITableViewDataSource,
UITableViewDelegate>

@property (nonatomic, assign) id <YZKCheckListDelegate>delegate;
@property (nonatomic, retain) id <YZKCheckListDatasource>datasource;

@property (nonatomic, retain) UILabel *titleName;

//展示界面
- (void)show;

//消失界面
- (void)dismiss;

//选中的列表元素
- (NSArray *)indexPathsForSelectedRows;

//列表cell的重用
- (id)dequeueReusableCheckListCellWithIdentifier:(NSString *)identifier;
- (UITableViewCell *)checkListCellForRowAtIndexPath:(NSIndexPath *)indexPath;

- (void)selectRowAtIndexPath:(NSIndexPath *)indexPath;
@end


@interface YZKCheckListViewCell : UITableViewCell

@property (nonatomic,strong)UIImageView *checkImageView;

@end
